<div id="headerdiv">
<!-- /home -->
	<div id="icondiv"><a href="http://127.0.0.1:8888/hezi/index"><img src="/hezi/images/home.png" width="20"/></a></div>
<!-- /forumselect --> 
    <div id="forumselectdiv"> 
		<a id="forumselectorbtn" href="#" class="btn btn-large btn-block btn-primary">选择论坛</a> 
	</div>
    

    
<!-- /category -->     
	<div id="categorydiv" class="btn-toolbar">
            <div class="btn-group">
            #foreach($category in $categorylist)
                <a id="$category.getId()btn" class="btn btn-primary category $category.getId()" category="$category.getId()" style="position:relative; padding-right:24px;">
                $category.getName()
                <span style=" position:absolute; top:0px; right:0px; font-size:10px">$category.getImagesSize()</span>
                </a>
            #end   
            </div>
    </div>
 
<!-- /change to post list view --> 

            
	<div id="changeviewdiv">
    	<a id='columnshowbtn' href='/hezi/postlist?postcategory=markedunproecessed' class='btn btn-large btn-block btn-primary'>切换到帖子视图</a>
	</div>

<!-- /forum group and forums -->
    <div id="forumlistdiv" class="tooltip fade bottom in"> 
        <div class="tooltip-arrow"></div>
        <div class="tooltip-inner">
         <a class="forumgroup btn btn-block btn-primary" forumgroupid="allforum">
                            	所有论坛 $allforum.newimagecount
                    </a>
            <table border="0" style="vertical-align:top">
              <tr>
                #foreach($groupitem in $groupslist)
                <td style="vertical-align:top">
                   <table border="0">
                   	  <!-- /group -->
                      <tr>
                        <td class="group" style="white-space:nowrap">
                        	<a class="forumgroup btn btn-block btn-primary" forumgroupid="$groupitem.id">
                            	$groupitem.name $groupitem.newimagecount
                            </a>
                        </td>
                      </tr>
                      
                      
                      <!-- /forum -->
                      <tr>
                     	<td>
                     	   #foreach($forumitem in $groupitem.getForumsInThisGroup() )
                     		<a id="viewforumbtn$forumitem.getId()" class="forum btn btn-primary count$forumitem.summary.newimagecount" 
                              forumid="$forumitem.getId()">
                              $forumitem.getId()<br>$forumitem.name<br>$forumitem.summary.newimagecount
                            </a>
                      	   #end
                      	</td>
                      </tr>
                    </table>
                </td>
                #end        
              </tr>
            </table>
			<div class="toggle" title="显示或隐藏新图片数为零的论坛">
                  <label class="toggle-radio" for="share-toggle4">ON</label>
                  <input class="emptyforumradio" type="radio" name="share-toggles2" id="share-toggle4" value="on">
                  <label class="toggle-radio" for="share-toggle3">OFF</label>
                  <input class="emptyforumradio" type="radio" name="share-toggles2" id="share-toggle3" value="off">
                  隐藏无新图的论坛
			</div>
        </div>
    </div><!--end of forum group and forums -->
    


</div>


<script language="javascript">
$(function(){


    $(".jMenu").jMenu();


	$("a.count0").hide();
	docategory();
	doforumselect();
})

function doforumselect(){
	$("#forumselectorbtn").click(function(){
		$("#forumlistdiv").toggle();
	});
	
	$(".emptyforumradio").change(function() {
		selectedvalue = $(this).val();
		console.log(selectedvalue);
		$("a.count0").toggle();
	});

	$("a.forumgroup").click(function(){
		var id = $(this).attr("forumgroupid");
		console.log(id);
		window.location.href="/hezi/picwall?forumgroup=" + id + "&windowwidth="+$(window).width();	
	});

	$("a.forum").click(function(){
		var forumid = $(this).attr("forumid");
		console.log(forumid);
		window.location.href="/hezi/picwall?forum=" + forumid + "&windowwidth="+$(window).width();	
	});
	
	var forumstr = "$!forum.getId() $!forum.getName()";
	if(forumstr.length > 2){
		$("#forumselectorbtn").html(forumstr);
	}
}

function docategory(){
	//category切换菜单
	$('a.$category').addClass("active");
	
	$("a.category").click(function(){
		category = $(this).attr("category");
		window.location.href="/hezi/picwall?action=view&category="+category+"&windowwidth="+$(window).width();		
	});
}



function notice(data){
	$("#messagea").html(data);	
	//$("#messagesdiv").append("<span>" + data + "</span><br>");
	//$("#messagecountspan").html( $("#messagesdiv span").length);
	$("#messagediv").show();		
}

function messagecallback(){
	$("#messagediv").show();
	//$("#messagecountspan").html( $("#messagesdiv span").length);
}

</script>
<style>
</style>
